package edu.pku.sei.act.actools.util;

public class Capability {
	
	public static final String ACTIVE_CAPABILITY = "active";
	public static final String PASSIVE_CAPABILITY = "passive";
	public static final String DAEMON_CAPABILITY = "daemon";

	String providerID;
	String abilityName;
	String description;
	String type;
	String input;
	String output;

	public Capability() {
		providerID = "null";
		abilityName = "null";
		description = "null";
		type = "null";
		input = "null";
		output = "null";
	}
	
	public Capability(String providerID, String abilityName,
			String description, String type, String input, String output) {
		super();
		this.providerID = providerID;
		this.abilityName = abilityName;
		this.description = description;
		this.type = type;
		this.input = input;
		this.output = output;
	}
	
	public String toString() {
		return ACToolsNamingSpace.EnvInfo.CAPABILITY_DESCRIPTOR + "," + providerID + "," + abilityName + "," + description + ","
				+ type + "," + input + "," + output;
	}

	public Capability(String envInfo) {
		String[] ss = envInfo.split(",");
		providerID = ss[1];
		abilityName = ss[2];
		description = ss[3];
		type = ss[4];
		input = ss[5];
		output = ss[6];
	}

	public String getProviderID() {
		return providerID;
	}

	public void setProviderID(String providerID) {
		this.providerID = providerID;
	}

	public String getAbilityName() {
		return abilityName;
	}

	public void setAbilityName(String abilityName) {
		this.abilityName = abilityName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getInput() {
		return input;
	}

	public void setInput(String input) {
		this.input = input;
	}

	public String getOutput() {
		return output;
	}

	public void setOutput(String output) {
		this.output = output;
	}
}
